//
//  JQFYTticketBannerModel.m
//  JQFY
//
//  Created by apple on 2017/10/9.
//  Copyright © 2017年 yannis. All rights reserved.
//

#import "JQFYTticketBannerModel.h"

@implementation JQFYTticketBannerModel{
    NSArray *_cycleImages;
}

- (void)getCycleImage:(void(^)(NSArray *cycleImages)) sucess file:(void(^)(void))file
{
    [[JQFYNetworkTool sharedManager] request:RequestMethodGet
                                   urlString:@"http://app.uninhibited.cn/api/show/ad/ticket"
                                  parameters:nil
                                    finished:^(id responseObject, NSError *error) {
                                        
                                        if (error) {
                                            if (file) {
                                                file();
                                            }
                                        } else {
                                            _cycleImages = [NSArray yy_modelArrayWithClass:[JQFYTticketBannerModel class] json:responseObject];
                                            if (sucess) {
                                                sucess(_cycleImages);
                                            }
                                        }
    }];
}

@end
